package com.td.client.gui.frame;

import mdes.slick.sui.Display;

import org.newdawn.slick.gui.GUIContext;

import com.td.client.states.GameplayState;
import com.td.core.communication.obj.GameStateInfo.STATE;

@Deprecated
public class Frame extends Display{

	static int FRAME_X = 0;
	static int FRAME_Y = 500;
	static int BUTTON_SIZE = 50;
	
	
	private GameplayState gameplay;
	
	private boolean mouseOnFrame;
	
	private AbstractWindow window;
		
	public Frame(GUIContext context, GameplayState gameplay) {
		super(context);
		
		this.gameplay = gameplay;
		
	}

	public void rebuildWindow(STATE state) {
		
		this.removeAll();
		
		switch(state) {
			case BUILDING:
				window = new BuildingWindow(this);
				break;
			case ACTION:
				window = new ActionWindow(this);
				break;
		}
		
		this.add(window);
	}
	
	public boolean isOn() {
		return mouseOnFrame;
	}
	
	public void unselectButtons() {
		
		window.unselectAllButtons();
	}

	public GameplayState getGameplay() {
		return gameplay;
	}

	public void setMouseOnFrame(boolean mouseOnFrame) {
		this.mouseOnFrame = mouseOnFrame;
	}
	
	
		
	
	
	
	
}
